package com.alone.jpa.query.wrapper;


import cn.hutool.core.lang.func.Func1;
import cn.hutool.core.lang.func.LambdaUtil;

import java.util.Objects;

/**
 * 传递getter,setter方法引用
 *
 * @author Alone
 */
public class LambdaSpecificationWrapper<Type> extends AbstractSpecificationWrapper<Type, Func1<Type, ?>, LambdaSpecificationWrapper<Type>> {

    @Override
    protected String columnToString(Func1<Type, ?> column) {
        if (Objects.isNull(column)) {
            return null;
        }
        return LambdaUtil.getFieldName(column);
    }

}
